﻿using System;
using System.Net;

namespace TruckWatch.Cloud.Models
{
    public static class ExtensionMethods
    {
        #region Number Extension Methods

        public static double ToRadian(this double angle)
        {
            return angle * Math.PI / 180;
        }

        public static double ToDegree(this double angle)
        {
            return angle * (180.0 / Math.PI);
        }

        public static bool IsEven(this int integer)
        {
            bool even = ((integer % 2) == 0);
            return even;
        }

        #endregion

    }
}
